package edu.gdkm.paydemo;

public class Student {
    String studentId;
    String name;
    double cScore;
    double computerScore;
    double englishScore;

    public Student() {
    }

    public Student(String studentId, String name) {
        this.studentId = studentId;
        this.name = name;
    }


    public Student(String studentId, String name, double cScore, double computerScore, double englishScore) {
        this.studentId = studentId;
        this.name = name;
        this.cScore = cScore;
        this.computerScore = computerScore;
        this.englishScore = englishScore;
    }
    @Override
    public String toString() {
        return "Student{" +
                "studentId='" + studentId + '\'' +
                ", name='" + name + '\'' +
                ", cScore=" + cScore +
                ", computerScore=" + computerScore +
                ", englishScore=" + englishScore +
                '}';
    }

    public double avg(){
        return (this.cScore+this.computerScore+this.englishScore)/3;
    }
}
